<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Documento sin título</title>
        <link href="../../js_v2/jquery-ui-1.8.7.custom/css/ui-lightness/jquery-ui-1.8.7.custom.css" rel="stylesheet" type="text/css" />
    </head>

    <body>
        <div id="frmcontainer" style="font-size:10px;" >
            <form id="frmcargosmanuales" name="frmcargosmanuales" method="post" action="">
                <div id="cuenta">
                    <table width="37%" border="0">
                        <tr>
                            <td valign="top">Tipo</td>
                            <td><p>
                                    <label>
                                        <input type="radio" name="tipocuenta" value="bene" id="tipocuenta_0" />
                                        Benefactor</label>
                                    <br />
                                    <label>
                                        <input type="radio" name="tipocuenta" value="alumn" id="tipocuenta_1" />
                                        Alumno</label>
                                    <br />
                                </p></td>
                        </tr>
                        <tr>
                            <td>Cuenta</td>
                            <td><label for="cuenta"></label>
                                <input type="text" name="cuenta" id="cuenta" />
                                <input type="hidden" name="nocuenta" id="nocuenta" /></td>
                        </tr>
                    </table>
                </div>
                <div id="detallecargos"><table width="60%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td><table width="100%" border="0">
                                    <tr>
                                        <td width="16%">Tipo Cargo</td>
                                        <td><label for="listacargos"></label>
                                            <select name="listacargos" id="listacargos">
                                            </select></td>
                                    </tr>
                                    <tr>
                                        <td valign="top">Datos Cargo</td>
                                        <td><label for="montomora"></label>
                                            <table width="100%" border="0">
                                                <tr>
                                                    <td width="22%">Frecuencia</td>
                                                    <td width="78%"><label for="frecuencia"></label>
                                                        <input type="text" name="frecuencia" id="frecuencia" /></td>
                                                </tr>
                                                <tr>
                                                    <td>Monto</td>
                                                    <td><label for="monto"></label>
                                                        <input type="text" name="monto" id="monto" /></td>
                                                </tr>
                                                <tr>
                                                    <td>Monto Mora</td>
                                                    <td><input type="text" name="montomora" id="montomora" /></td>
                                                </tr>
                                                <tr>
                                                    <td>% Mora</td>
                                                    <td><label for="porcmora"></label>
                                                        <input type="text" name="porcmora" id="porcmora" /></td>
                                                </tr>
                                                <tr>
                                                    <td>Fecha Inicia</td>
                                                    <td><label for="fechainicia"></label>
                                                        <input type="text" name="fechainicia" id="fechainicia" /></td>
                                                </tr>
                                                <tr>
                                                    <td>&nbsp;</td>
                                                    <td><input type="submit" name="Agregar" id="Agregar" value="Agregar" /></td>
                                                </tr>
                                            </table></td>
                                    </tr>
                                </table></td>
                        </tr>
                        <tr>
                            <td><div class="dttb" id="tabladetalles">
                                    <table width="100%" border="0">
                                        <thead>
                                            <tr>
                                                <th scope="col">Cargo</th>
                                                <th scope="col">Monto</th>
                                                <th scope="col">Fecha Inicia</th>
                                                <th scope="col">Opciones</th>
                                            </tr>
                                        </thead>
                                        <tbody>              
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>Eliminar </td>
                                            </tr>
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div></td>
                        </tr>
                        <tr>
                            <td><input type="submit" name="guardar" id="guardar" value="Guardar" /></td>
                        </tr>
                    </table>
                </div>
                <script type="text/javascript">
		
                    var callbackSelect=function( event, ui ) {
                        $("#nocuenta").val(ui.item.id);                    
                        $("#nombrecuenta").val(ui.item.value);
                    };
			
                    var opsAlumnos={
                        source: app.ajaxRequestPath+"&mod=ModListasValores&report=lovalumnos",
                        minLength: 1,
                        select: callbackSelect 
                    };
                    var opsBenefacts={
                        source: app.ajaxRequestPath+"&mod=ModListasValores&report=lovbenef",
                        minLength: 1,
                        select:callbackSelect
                    };

                    $("#cuenta").autocomplete(opsAlumnos);
                    $("input[name*=tipocuenta]").click(function(){
                        if(this.value==1){                   
                            $("#cuenta").autocomplete(opsAlumnos);
                        }
                        if(this.value==2){                    
                            $("#cuenta").autocomplete(opsBenefacts);
                        }
                    });
                    $("#fechainicia").datepicker({changeYear:true,yearRange: 'c-50:c',dateFormat:'dd/mm/yy'});
                </script>
            </form>
        </div>
    </body>
</html>
